package com.minxi.java.controller;

import com.minxi.java.Dao.impl.ALL;
import com.minxi.java.JavaBean.UserInfo;

import javax.servlet.ServletException;
import javax.servlet.ServletRequest;
import javax.servlet.ServletResponse;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;

@WebServlet("/abc")

public class jspservlet extends HttpServlet {
    @Override
    public void service(ServletRequest req, ServletResponse res) throws ServletException, IOException {
        req.setCharacterEncoding("UTF-8");
        String a=req.getParameter("rq");
        String b=req.getParameter("qd");
        String c=req.getParameter("zd");
        String d=req.getParameter("jg");
        String e=req.getParameter("lx");
        String f=req.getParameter("gs");
        UserInfo userInfo = new UserInfo(a,b,c,Integer.parseInt(d),e,f);
        ALL all = new ALL();
        all.add(userInfo);
        req.getRequestDispatcher("/jsp/jsp1/index.jsp").forward(req,res);

    }

}
